<?php
/**
 * 加载Iframe框架
 * @author yaoli<yaoli@pateo.com.cn>
 * @version 1.0 add by yaoli<yaoli@pateo.com.cn> 
 */
class userinfo extends ActionBase1 {
	
	
	function init(){
		
	}
	
	/**
	 * 动作
	 *
	 * @see AActionBase::action()
	 */
	public function action() {
		
		 show404("不存在的方法！");
	}
	
	public function index(){

		$user = load_model("bcs")->getuserinfo();
		
		$this->data['user'] =$user['customer'];
		#dump($this->data['user']);
		$this->template("userinfo.html");
	}
	
	public function saveuser(){
		// ASH校验
		filter::checkformhash ( $this->data ['request'] ['HASH_CODE'] );
		
		unset($this->data ['request'] ['HASH_CODE']);
		
		if(isset($this->data['request'])){
			$status = load_model("bcs")->saveuserinfo($this->data['request']);
			if(isset($status['status']['code'])&&$status['status']['code']==100){
				showSuc("修改用户成功");
			}else{
				show404("操作失败");
			}
		}
	}
	
}
